package com.deep.spring.v25;

import com.deep.spring.v25.config.EnableMyConfig2;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Configuration;

/**
 * 启动方法
 */
//@SpringBootApplication
@Configuration
@EnableAutoConfiguration
@EnableMyConfig2
public class EnableApplication {

    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(EnableApplication.class);
        // app.setWebEnvironment(false);
        ConfigurableApplicationContext context = app.run(args);

        String test = context.getBean("test2", String.class);
        System.out.println("bean是否存在--->" + test);
    }

}
